package book;

public class BookList {
    Book[] books = new Book[10];
    private int bookSize;

    public BookList() {
        books[0] = new Book("三国演义", "罗贯中", 19.9, "小说");
        books[1] = new Book("西游记", "吴承恩", 29.9, "小说");
        books[2] = new Book("红楼梦", "曹雪芹", 39.9, "小说");
        books[3] = new Book("水浒传", "施耐庵", 9.9, "小说");
        this.bookSize = 4;
    }

    public int getBookSize() {
        return bookSize;
    }

    public void setBookSize(int bookSize) {
        this.bookSize = bookSize;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book book) {
        books[bookSize] = book;
        bookSize++;
    }
}
